package com.ww.springboot.mybatis.dto;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 模型DTO
 *
 * @author Chill
 */
@Data
public class OnlineChannelServiceBindDTO {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;
    /**
     * 关联线上服务id
     */
    @NotNull(message = "线上服务id不能为空")
    private Long ocsId;
    /**
     * 渠道id
     */
    private Long channelId;
    /**
     * 渠道编码
     */
    private String channelCode;
    /**
     * 渠道id，多个用逗号分隔
     */
    @NotEmpty(message = "渠道名称不能为空", groups = Save.class)
    private List<ChannelDTO> channels;

    /**
     * 运费左区间
     */
    private BigDecimal freightLow;
    /**
     * 运费右区间
     */
    private BigDecimal freightHigh;
    /**
     * 总金额左区间
     */
    private BigDecimal totalPriceLow;
    /**
     * 总金额右区间
     */
    private BigDecimal totalPriceHigh;
    /**
     * 单件金额左区间
     */
    private BigDecimal priceLow;
    /**
     * 单件金额右区间
     */
    private BigDecimal priceHigh;
    /**
     * 店铺DTO信息
     */
    @Valid
    private List<OnlineChannelServiceBindStoreDTO> onlineChannelServiceBindStoreDTOList;

    /**
     * 店铺类型
     */

    @NotNull(message = "店铺类型不能为空")
    private Integer storeType;

    /**
     * 平台id
     */
    private Long platformId;

    /**
     * 平台简码
     */
    @NotNull(message = "平台简码不能为空")
    private String platformCode;

    public interface Save {

    }
}
